package huangbiao;
import java.util.Scanner;
public class spent10 {
	public static void main(String []args) {		
	        String h="hhhthHHHH";
		    String j="hhhHHjHHhhh";
			System.out.println("输入要h截取的首下标a");
			Scanner input =new Scanner(System.in);
	              	int a=input.nextInt();
			System.out.println("输入h要截取的后下标b");
	              int b=input.nextInt();	              	
	              	String H=h.substring(a,b);
	              	System.out.println("输出截取后的H:"+H);
	              	System.out.println("输入要j截取的首下标c");
	    			int c=input.nextInt();
	              	System.out.println("输入j要截取的后下标d");    	              	
	    	              	int d=input.nextInt();
			        String J=j.substring(c,d);
			        System.out.println("输出截取后的J:"+J);
			        boolean f=H.equalsIgnoreCase(J);
			        if(f==true) {
			        	System.out.println("两个子字符串相同");
			        }	else
			        		System.out.println("两个子字符串不相同");
			        }
			        
}
